/*
 * class for templating Crews
 */

package item.defensive;

import item.Item;

import java.io.Serializable;

public class Crew extends Item implements DefensiveEnhancement, Serializable, Comparable<Crew> {
	
	private static final long serialVersionUID = -5150918818796891090L;
	
	public int crew; // the amount of max crew this item provides
	
	//creates an Crew object

	protected Crew(int cost, int condition, int level, int weight, int crew) {
		super(cost, condition, level, weight);
		this.crew = crew;
	}//end of constructor Crew
	
	public String toString() {
		return super.toString() + ": " + crew;
	}

	//sets natural ordering by amount of crew space provided
	
	public int compareTo(Crew o) {
		return o.crew -  this.crew;
	}//end of method compareTo

}//end of class Crew